<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/financier.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateFactureTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateFactureLabel_nomFacture}" for="nomFacture" />
                    <p:inputText id="nomFacture" required="true" value="#{factureController.selected.nomFacture}" title="#{bundle.CreateFactureTitle_nomFacture}" />
                    <p:message for="nomFacture"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_idFacture}" for="idFacture" />
                    <p:inputText id="idFacture" value="#{factureController.selected.idFacture}" title="#{bundle.CreateFactureTitle_idFacture}" />
                    <p:message for="idFacture"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_categorieFacture}" for="categorieFacture" />
                    <p:selectOneMenu id="categorieFacture" value="#{factureController.selected.categorieFacture}" title="#{bundle.CreateFactureTitle_categorieFacture}" >
                        <f:selectItems value="#{categorieFactureController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorieFacture"/>
                    <h:outputLabel/>
                    <h:outputLabel/>
                    <h:outputLabel/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_dateCreation}" for="dateCreation" />
                    <p:calendar id="dateCreation" value="#{factureController.selected.dateCreation}" pattern="dd/MM/yyyy" title="#{bundle.CreateFactureTitle_dateCreation}" >
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateCreation"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_dateCloture}" for="dateCloture" />
                    <p:calendar id="dateCloture" value="#{factureController.selected.dateCloture}" pattern="dd/MM/yyyy" title="#{bundle.CreateFactureTitle_dateCloture}" >
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateCloture"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_soldeHT}" for="soldeHT" />
                    <p:inputText id="soldeHT" value="#{factureController.selected.soldeHT}" title="#{bundle.CreateFactureTitle_soldeHT}" />
                    <p:message for="soldeHT"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_soldeTVA}" for="soldeTVA" />
                    <p:inputText id="soldeTVA" value="#{factureController.selected.soldeTVA}" title="#{bundle.CreateFactureTitle_soldeTVA}" />
                    <p:message for="soldeTVA"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_paiementOk}" for="paiementOk" />
                    <p:selectBooleanCheckbox id="paiementOk" value="#{factureController.selected.paiementOk}" title="#{bundle.CreateFactureTitle_paiementOk}" />
                    <p:message for="paiementOk"/>
                    <h:outputLabel value="#{bundle.CreateFactureLabel_soldePaye}" for="soldePaye" />
                    <p:inputText id="soldePaye" value="#{factureController.selected.soldePaye}" title="#{bundle.CreateFactureTitle_soldePaye}" />
                    <p:message for="soldePaye"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{factureController.create}" value="#{bundle.CreateFactureSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{factureController.prepareList}" value="#{bundle.CreateFactureShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
